package com.songkun.template.refrofit;

import com.songkun.template.utils.ILog;
import java.io.IOException;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;


public class HeaderInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        Request request = chain.request();
        ILog.i("为http请求添加Header");
        request = request.newBuilder()
                .addHeader("OS","Android")
                .addHeader("Author","SUNKING")
                .build();
        Response response = chain.proceed(request);
        return response;
    }
}
